package com.woniuxy.yuekeuser.dao;

import com.woniuxy.yuekeuser.model.HotolcarImage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Freedom
 * @since 2020-11-03
 */
public interface HotolcarImageMapper extends BaseMapper<HotolcarImage> {
    @Select("SELECT\n" +
            "hotolcar_image.hotolcar_image_id,\n" +
            "hotolcar_image.hotolcar_id,\n" +
            "hotolcar_image.hotolcar_image_address,\n" +
            "hotolcar_image.hotolcar_image_words\n" +
            "FROM\n" +
            "hotolcar_image\n" +
            "WHERE\n" +
            "hotolcar_image.hotolcar_id = #{hotolcarId}")
    public List<HotolcarImage> queryHotolcarImageByHotolcarId(int hotolcarId);

    @Insert("insert into hotolcar_image (hotolcar_id,hotolcar_image_address) values(#{hotoCarId},#{hotolcarImagePath})")
    public void addhotolcarpath(@Param(value="hotoCarId") int hotoCarId, @Param(value="hotolcarImagePath") String hotolcarImagePath);

}
